oopovermatch
% {(.-)(\letterpercent b\letterleftbrace\letterrightbrace)(.-)}
% {Th{i}s {is} not a {que{s}tion} anymore!}
% {#1<#2>#3}
\startluacode
interfaces.implement {
name = "WeirdCommand",
-- arguments = "string",
arguments = "detokened",
}
context.bTABLE()
context.bTR()
context.bTD() context("$x$") context.eTD()
context.bTD() context("$0$") context.eTD()
for _, a in ipairs(angleList) do
context.bTD() context("$\letterpercent.0f$",a) context.eTD()
end
context.eTR()
context.bTR()
context.bTD() con
v2 300%
(ECI)'
Here is a MWE that generates these errors:
setupinteraction
[title=TITLE,
subtitle=SUBTITLE,
author=AUTHOR,
keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}]
%% For PDF/A
\setupbackend[
format={pdf/a-1b:2005}, % or pdf/a-1a:2005
profile={default_cmyk.icc,default_rgb.icc,de
subtitle=SUBTITLE,
author=AUTHOR,
keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}]
%% For PDF/A
\setupbackend[
format={pdf/a-1b:2005}, % or pdf/a-1a:2005
profile={default_cmyk.icc,default_rgb.icc,default_gray.icc},
intent=ISO coated v2 300\letterpercent\space (ECI)]
%% Tagged PDF
%% method=auto =
nclose the url inside \startasciimode...\stopasciimode to
avoid escaping the percent sign.
The percent sign has to be escaped as \letterpercent (otherwise, you get
\%) in text.
A simpler approach would read (there is a single url, instead of two
[less typos in the end]):
\setupinteraction[state=start]
\sta
on PDF/A
<https://wiki.contextgarden.net/PDF/A>:
---
\setupinteraction[title=MyTitle,state=start]
\setupinteractionscreen[option={title}]
\setupbackend[
format={pdf/a-1a:2005},
profile={default_cmyk.icc,default_rgb.icc,default_gray.icc},
intent=ISO coated v2 300\letterpercent\spac
PDF/A>:
---
\setupinteraction[title=MyTitle,state=start]
\setupinteractionscreen[option={title}]
\setupbackend[
format={pdf/a-1a:2005},
profile={default_cmyk.icc,default_rgb.icc,default_gray.icc},
intent=ISO coated v2 300\letterpercent\space (ECI)]
%% Tagged PDF
%% method=auto ==> def
Thank you Jairo!
I have tried playing around with letterpercent/catcodes as well, not sure
what I did wrong, but your examples work just fine, so thanks again.
Adam
On Sat, May 29, 2021 at 2:04 PM Jairo A. del Rio
wrote:
> Hi, Adam. There are some ways to do it. I'm sure there are many m
... \relax doesn't work
\startmkivmode
\startluacode
xmath = xmath or math
xcomplex = xcomplex or {} --maybe math too???
\stopluacode
\stopmkivmode
\starttext
$\pi = \ctxlua{context("\letterpercent.6f", math.pi)}$
$\pi = \expression string.format("\letterpercent.6f", pi
7839
84828001486412574060553756854137069878601
]]
end
\stopluacode
\starttext
\doloopovermatch {\letterpercent d} {\luaexpr{userdata.myfunction()}} {%
\colored[h=\luaexpr{40*#1},s=1,v=1]{#1}\space
}
(I think it
a ConTeXt perspective in the
following list (sorry about the formatting!):
'{': "\\{"
\letterleftbrace
'}': "\\}"
\letterrightbrace
'_': "\\_"
No escape needed.
'%': "\\%"
\letterpercent
'#': "\\#&quo
uckerei
%% nachfragen.
\setupbackend[
%format=PDF/X-1a:2001,
%format=PDF/X-1a:2003,
%format=PDF/X-3:2002,
format=PDF/X-3:2003,
%format=PDF/X-4,
%format=PDF/X-4p,
intent={ISO Coated v2 300\letterpercent\space (ECI)},
]
\stopmode
%% FOGRA 39 Coated
%% Bestimmung der CMYK-We
DF/X-3:2003,
intent={ISO Coated v2 300\letterpercent\space (ECI)},
]
Ciao!
Jan Ulrich Hasecke
--
--
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog: http://www.hasecke.eu
Netzliteratur-Projekt:
entry.
Very nice and easy to maintain the list of names.
You have to wikify all the answers ... here's another one:
\doloopovermatch {([^\letterpercent s,]+)} {aa, bb, cc, dd} {/#1/}
or more complex matching:
\doloopovermatch {(\letterpercent w+) *(\letterpercent w*)} {aa bb cc dd
ght] Valor nominal \stopxcell
\startxcell \$100\,000 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Tasa cupón - periodicidad anual \stopxcell
\startxcell 12,50\,\letterpercent{} \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Cupón \stopxcell
\startxcell \$12\,500 \stopxcell
\stopxrow
nt=7pt]
> \startxtablehead[head]
> \startxrow
> \startxcell[align=right,width=.1\textwidth] \strong{Altura\crlf (msnm)}
> \stopxcell
> \startxcell[align=right,width=.28\textwidth] \strong{Gramíneas forrajeras
> de corte} \stopxcell
> \startxcell[align=middle,width=.06\text
] \strong{MS
(\letterpercent{})} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{PC\crlf
(\letterpercent{} MS)} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{FDN\crlf
(\letterpercent{} MS)} \stopxcell
\startxcell[align=middle,width=.1\textwidth] \strong{FDA\crlf
On 10/13/20 5:33 PM, Pablo Rodriguez wrote:
> [...]
> \starttext
> \ctxlua{ d = [[\env{fname}]] }
>
> d: \cldcontext{d}\\
> \doifelse{\cldcontext{d:match("\letterpercent d+")}}
> {123}{yes}{no}
> \stoptext
> [...]
> 3. I’m trying this on
Pablo Rodriguez schrieb am 13.10.2020 um 17:33:
Dear list,
I have the following sample:
\starttext
\def\numbersfname
{\cldcontext{string.match([[\env{fname}]], "\letterpercent d+")}}
\ctxlua{ c = context.getvariable("environment", "fname") or &quo
On Tue, 13 Oct 2020, Pablo Rodriguez wrote:
> Dear list,
>
> I have the following sample:
>
> \starttext
> \def\numbersfname
> {\cldcontext{string.match([[\env{fname}]], "\letterpercent d+")}}
> \ctxlua{ c = context.getvariable("environment"
Dear list,
I have the following sample:
\starttext
\def\numbersfname
{\cldcontext{string.match([[\env{fname}]], "\letterpercent d+")}}
\ctxlua{ c = context.getvariable("environment", "fname") or "a" }
\ctxlua{ d = [[\env{fname}]] }
tex:
}
c: \cldcontext{c}\\
\doifelse{\cldcontext{c:match("\letterpercent d+")}}
{123}{yes}{no}\\
d: \cldcontext{d}\\
\doifelse{\cldcontext{d:match("\letterpercent d+")}}
{123}{yes}{no}
\stoptext
Which is the Lua equivalent of \getvariable{}{}?
On 8/27/20 7:35 PM, Wolfgang Schuster wrote:
> [...]
> You have to replace %% with \letterpercent\letterpercent because you're
> still playing with TeX rules.
>
> \startxmlsetups xml:special
> \startitem
> \cldcontext{string.gsub("\xmlraw{#1}{.}"
Pablo Rodriguez schrieb am 27.08.2020 um 19:16:
On 8/27/20 6:16 PM, Wolfgang Schuster wrote:
Pablo Rodriguez schrieb am 27.08.2020 um 17:56:
[...]
\startxmlsetups xml:special
\startitem
\cldcontext{string.gsub([[\xmlraw{#1}{.}]], "%%",
"
On 8/27/20 6:16 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 27.08.2020 um 17:56:
>> [...]
>>\startxmlsetups xml:special
>> \startitem
>> \cldcontext{string.gsub([[\xmlraw{#1}{.}]], "%%",
>> "\\letterp
Pablo Rodriguez schrieb am 27.08.2020 um 17:56:
On 8/27/20 5:30 PM, Taco Hoekwater wrote:
[...]
Using Lua gsub(), I need to replace something like:
string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent")
Double it: %%
See also https://www.lua.org/manual/5
On 8/27/20 5:30 PM, Taco Hoekwater wrote:
>> [...]
>> Using Lua gsub(), I need to replace something like:
>>
>> string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent")
>
> Double it: %%
>
> See also https://www.lua.org/manual/5.3/manual.htm
xt with percent signs.
> ConTeXt parses them as comments (so no output).
>
> Using Lua gsub(), I need to replace something like:
>
> string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent")
>
> How do I need to invoke % to get the character found?
>
> Ma
> string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent")
Double it: %%
See also https://www.lua.org/manual/5.3/manual.html#6.4.1 , but the mention of
%% is a bit hidden.
Best wishes,
Taco___
If your que
Dear list,
I have and \xmlraw command that gives some text with percent signs.
ConTeXt parses them as comments (so no output).
Using Lua gsub(), I need to replace something like:
string.gsub([[\xmlraw{#1}{.}]], "%", "\\letterpercent")
How do I need to invoke % to get
Hi,
For those who like playing around you can use lua pettern matching in a
match loop:
\starttext
\doloopovermatch
{(\letterpercent w+) *(\letterpercent w*)}
{aa bb cc dd}
{
[
\doloopovermatch
{(\letterpercent w)(\letterpercent w)}
{#1
Hello Hans,
-- Původní e-mail -- {
Od: Hans Hagen
as you updated, it's just:
\startluacode
local defined = tokens.defined
for _, v in ipairs{ "MyMacro", "MyMacWithPars", "Undefined", "DoNothing",
"NonExisting" }
== "undefined_cmd"
end
end
end
--
local defined = tokens.defined
for _, v in ipairs{ "MyMacro", "MyMacWithPars", "Undefined", "DoNothing",
"NonExisting" } do
print(string.format("\letter
ot;DoNothing",
"NonExisting" } do
print(string.format("\letterpercent-12s", v), defined(v), defined(v,
true), defined(v, false))
end
\stopluacode
Aaa
\stoptext
gives:
"
MyMacro false false false
MyMacWithPars false false false
Undefined f
ot;undefined_cmd"
>end
>end
>end
>
>--
>
>local defined = tokens.defined
>
>for _, v in ipairs{ "MyMacro", "MyMacWithPars", "Undefined", "DoNothing",
> "NonExisting"
nd
end
--
local defined = tokens.defined
for _, v in ipairs{ "MyMacro", "MyMacWithPars", "Undefined", "DoNothing",
"NonExisting" } do
print(string.format("\letterpercent-12s", v), defined(v), defined(v,
true), defined(v,
{xmpfile}}\ifempty
\p_file \else
\clf_setxmpf...
\setup_backend ...end [#1]\the \everysetupbackend
l.11 ...ISO coated v2 300\letterpercent\space (ECI)]
mtx-context | fatal error: return code: 1
Removing either of the \setupbackend
{xmpfile}}\ifempty
\p_file \else
\clf_setxmpf...
\setup_backend ...end [#1]\the \everysetupbackend
l.11 ...ISO coated v2 300\letterpercent\space (ECI)]
mtx-context | fatal error: return code: 1
Removing either of the \setupbackend
\p_file \else
\clf_setxmpf...
\setup_backend ...end [#1]\the \everysetupbackend
l.11 ...ISO coated v2 300\letterpercent\space (ECI)]
mtx-context | fatal error: return code: 1
Removing either of the \setupbackend instructions still results in the
same error
[location=middle, marking=on]
\setupinteraction
[title={TestDoc},
author={Anon}]
\setupbackend
[format=PDF/X-1a:2003,
intent={ISO Coated v2 300\letterpercent\space (ECI)}]
\setupinteractionscreen[width=max,height=max]
\startluacode
moduledata.mystuff={}
respecify_pdf_boxes = function
/base/mkiv/lpdf-mis.lua:
\appendtoks
\startluacode
local formatters = string.formatters
local pdfverbose = lpdf.verbose
local pdfarray = lpdf.array
local factor = number.dimenfactors.bp
local f_value = formatters["\letterpercent.6N"]
local functio
[state=start]
\setupinteraction[state=start]
%setupbackend[format={pdf/a-3u},
\setupbackend[format={pdf/a-3a},
level=0,
profile={default_gray.icc},
intent={ISO coated v2 300\lett
Am 12.02.2020 um 09:41 schrieb juh:
> Hi all,
>
> again I have a question concerning color profiles.
>
> I have this to load the ISO Coated v2 300% profile.
>
> \setupbackend[
>format=PDF/X-3:2003,
> intent={ISO Coated v2 300\letterpercent\space (ECI)},
>]
Hi all,
again I have a question concerning color profiles.
I have this to load the ISO Coated v2 300% profile.
\setupbackend[
format=PDF/X-3:2003,
intent={ISO Coated v2 300\letterpercent\space (ECI)},
]
\setupcolors[cmyk=yes,rgb=no,]
But is this profile part of the new lmtx version
-blackitalic]
\startbuffer [Sampler]
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z à ë í ô ç
1 2 3 4 5 6 7 8 9 0 ` \texttilde\ - = ! @ \# \$ \letterpercent\ ^ \&
* ( ) _ + [ ] \textbacks
J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z à ë í ô ç
1 2 3 4 5 6 7 8 9 0 ` \texttilde\ - = ! @ \# \$ \letterpercent\ ^ \&
* ( ) _ + [ ] \textbackslash\ ; ' , . / \{ \} \| : " < > ?
\fontname\font
\blank
achment.
>
> \setuplanguage [en]
> \setuptagging [state=start]
> \setupinteraction [state=start]
> \setupbackend [format={pdf/a-3a},profile={default_gray.icc},
> intent={ISO coated v2 300\letterpercent\space
> (ECI)}]
>
},
intent={ISO coated v2 300\letterpercent\space
(ECI)}]
\setupstructure [state=start,method=auto]
\setupcolors [pagecolormodel=auto,start=yes,rgb=no,cmyk=no]
\setupbodyfont [Palatino,10pt]
\starttext
Attaching a plain text file.
% \attachment
, if you have many such files is to define a macro:
\define[1]\APPDATA{\mono{\letterpercent
APPDATA\letterpercent\letterbackslash#1}}
And then use:
\footnote{\APPDATA{file.txt}}
or ...
\footnote{\type[compact=absolute]{%APPDATA%\file.txt
with the
\typeinlinebuffer command.
\starttext
\startbuffer
%APPDATA%\file.txt
\stopbuffer
\footnote{\typeinlinebuffer}
\stoptext
Another option, if you have many such files is to define a macro:
\define[1]\APPDATA{\mono{\letterpercent
APPDATA\letterpercent\letterbackslash#1}}
And then use:
\footnote
%APPDATA%\file.txt
\stopbuffer
\footnote{\typeinlinebuffer}
\stoptext
Another option, if you have many such files is to define a macro:
\define[1]\APPDATA{\mono{\letterpercent
APPDATA\letterpercent\letterbackslash#1}}
And then use:
\footnote{\APPDATA{file.txt}}
Aditya
On Mon, 4 Nov 2019, cont...@vivaldi.net wrote:
Hello Aditia,
thanks for reaction.
I simply want to write "%APPDATA%\file.txt" and the same into the
footnote, with ability to use the text "%APPDATA%\file.txt" without any
substitution (like "%" -> &quo
Hello Aditia,
thanks for reaction.
I simply want to write "%APPDATA%\file.txt" and the same into the
footnote, with ability to use the text "%APPDATA%\file.txt" without any
substitution (like "%" -> "\letterpercent") - if possible.
My attepmts with
not simply print "%": "%" at the end yields "" whilst "\%"
produces "\%".
Is there a simple way to prinst simple "%"?
(There is probably a more clumsy way - type \letterpercent instead of %
- but this is a minimal sample; in my re
t; at the end yields "" whilst "\%"
produces "\%".
Is there a simple way to prinst simple "%"?
(There is probably a more clumsy way - type \letterpercent instead of %
- but this is a minimal sample; in my real sample there are many "%"s to
be shown a
Willi Egger schrieb am 21.04.2019 um 19:28:
Hi all,
"when manipulating in one area you will have to manipulate also in other aeras”
I must confess.
I asked some time ago about manipulating the pagenumber. Wolfgang provide me
the following approach:
\cldcontext{“\letterperce
Hi all,
"when manipulating in one area you will have to manipulate also in other aeras”
I must confess.
I asked some time ago about manipulating the pagenumber. Wolfgang provide me
the following approach:
\cldcontext{“\letterpercent.0f”,(\pagenumber+1)/2}
This works indeed fine. Howeve
pulate the page number. However I
> get an error:
>
>
> MWE:
>
> \setuppapersize [A6] [A6]
>
> \setuppagenumbering[location=none]
>
> \startsetups [Pagenumber]
> \doifrightpageelse
>{\cldcontext{"\letterpercent d",(\pagenumber+1)/2}}
>
Willi Egger schrieb am 02.04.19 um 21:17:
Hello!
I have the following code, which should manipulate the page number. However I
get an error:
MWE:
\setuppapersize [A6] [A6]
\setuppagenumbering[location=none]
\startsetups [Pagenumber]
\doifrightpageelse
{\cldcontext{"\letterpe
Hello!
I have the following code, which should manipulate the page number. However I
get an error:
MWE:
\setuppapersize [A6] [A6]
\setuppagenumbering[location=none]
\startsetups [Pagenumber]
\doifrightpageelse
{\cldcontext{"\letterpercent d",(\pagenumber+1)/2}}
{}
\
[pagenumber]
\doifoddpageelse
{\cldcontext{"\letterpercent d",(\pagenumber+1)/2}}
{}
\stopsetups
\setupheadertexts [\directsetup{pagenumber}]
\starttext
\dorecurse{10}{\samplefile{knuth}}
\stoptext
Variant 2:
\defineexpandable[1]\DwarsliggerNumber
{\cldcontext{"\
lor[mycolor][r=0.5*0.7]
>
> \starttext
>
> \colored[r=\cldcontext{0.5*0.7}]{\cldcontext{0.5*0.7}}
>
> \colored[r=\cldcontext{"\letterpercent
> .3f",0.5*0.7}]{\cldcontext{"\letterpercent .3f",0.5*0.7}}
>
> \stoptext
>
Better use \luaexpr. From th
[r=\cldcontext{"\letterpercent
.3f",0.5*0.7}]{\cldcontext{"\letterpercent .3f",0.5*0.7}}
\stoptext
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
W
>
> I copied the file CoatedFOGRA39.icc to
>
> context/tex/texmf-context/colors/icc/profiles
>
> My setup worked before.
>
> Using the intent "ISO Coated v2 300\letterpercent\space (ECI)" I get no
> error.
>
I solved the problem by installing the color
ng the intent "ISO Coated v2 300\letterpercent\space (ECI)" I get no
error.
TIA
juh
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http:/
[
format={pdf/a-1b:2005}, % or pdf/a-1a:2005
profile={default_cmyk.icc,default_rgb.icc,default_gray.icc},
intent=ISO coated v2 300\letterpercent\space (ECI)]
%% Tagged PDF
%% method=auto ==> default tags by Adobe
\setupbackend[export=yes]
\setupstructure[state=start,method=auto]
\starttext
\chap
finished string
near eof”. Obviously caused by the %’s.
How to get this working? \textpercent will not do, off course within
Luacode.
% = \letterpercent
$ = \letterdollar
You can also replace
\directlua{tex.print(...)}
with
\ctxlua{context(...)}
or
\cldcontext
]{term}\letterpercent
\xmlflush{#1}
Have you tried this?
(I cannot construct an MWE at this point either.)
And now I can construct it, so here is a not-necessarily-minimal
example. Note that the problem occurs in footnotes (and endnotes, left
as an exercise to the curious
, as
\Name[key]{term}%
\xmlflush{#1}
or perhaps
\Name[key]{term}\letterpercent
\xmlflush{#1}
Have you tried this?
(I cannot construct an MWE at this point either.)
And now I can construct it, so here is a not-necessarily-minimal
example. Note that the problem occurs in footnotes
}
or perhaps
\Name[key]{term}\letterpercent
\xmlflush{#1}
Have you tried this?
(I cannot construct an MWE at this point either.)
--
Rik
___
If your question is of interest to others as well, please add an entry
eyword={{KEYWORD1, KEYWORD2}, KEYWORD3}]
%% For PDF/A
\setupbackend[
%format={pdf/a-1b:2005}, % OK
%format={pdf/a-1a:2005}, % OK
%format={pdf/a-2a}, % OK
format={pdf/a-3a}, % OK
profile={srgb.icc,default_gray.icc},
intent=ISO coated v2 300\letterpercent\space (ECI)]
%% Tagged PDF
%% m
idate.aspx
>>
>>
>>
> Thank you for the report, I will check asap.
>
>
these look ok now
\nopdfcompression
\setupinteraction
[title=TITLE,
subtitle=SUBTITLE,
author=AUTHOR,
keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}]
%% For PDF/A
\setupbackend[
%format={pdf/a-1b:200
]
\setupcolors[cmyk=no,rgb=yes]
\stopnotmode
\startmode[print]
\setupcolors[cmyk=yes,rgb=no]
\setupbackend[
format=PDF/X-1a:2003,
% intent={ISO Coated v2 300\letterpercent\space (ECI)},
intent={SWOP2006_Coated3v2.icc},
]
\stopmode
\setuppapersize [A4] [A4]
\starttext
=PDF/X-1a:2003,
% intent={ISO Coated v2 300\letterpercent\space (ECI)},
intent={SWOP2006_Coated3v2.icc},
]
\stopmode
\setuppapersize [A4] [A4]
\starttext
\blackrule[width=3cm,height=1cm,depth=0pt,color=hs-orange] HS Orange
r=0.866, g=0.286, b=0.003
\blank
\blackrule[width=3cm,height=1cm
t; \stopnotmode
>
> \startmode[print]
> \setupcolors[cmyk=yes,rgb=no]
> \setupbackend[
> format=PDF/X-3:2003,
>intent={ISO Coated v2 300\letterpercent\space (ECI)},
>]
> \stopmode
>
> When I use "context" or "context --mode=pri
:2003,
intent={ISO Coated v2 300\letterpercent\space (ECI)},
]
\stopmode
When I use "context" or "context --mode=print" everything works as expected.
But! I have SVG icons I want to use in the document. They contain the
above defined rgb colors.
When I use --mode=print I
On 03.10.18 11:29, Wolfgang Schuster wrote:
>
>
> Jan U. Hasecke schrieb am 01.10.18 um 10:47:
>> I get this error when I try to compile a pdf with:
>>
>> \setupbackend[
>> format=PDF/X-3:2003,
>> intent={ISO Coated v2 300\letterpercent\space (EC
Jan U. Hasecke schrieb am 01.10.18 um 10:47:
I get this error when I try to compile a pdf with:
\setupbackend[
format=PDF/X-3:2003,
intent={ISO Coated v2 300\letterpercent\space (ECI)}
]
You need a comma after the right brace for the intent argument.
When you take a closer look
I get this error when I try to compile a pdf with:
\setupbackend[
format=PDF/X-3:2003,
intent={ISO Coated v2 300\letterpercent\space (ECI)}
]
In log:
backend > profiles > setting format to 'PDF/X-3:2003'
backend > profiles > forcing pdf version 1.4.0, compres
/18 05:37, Jan U. Hasecke wrote:
On 13.08.2018 17:57, Pablo Rodriguez wrote:
if you don’t mind using Lua, here you have it:
\starttext
\def\duedate{\cldcontext{os.date('\letterpercent d/\letterpercent
m/\letterpercent Y', os.time()+ 10 * 24 * 3600)}}
\duedate
On 13.08.2018 17:57, Pablo Rodriguez wrote:
> if you don’t mind using Lua, here you have it:
>
> \starttext
> \def\duedate{\cldcontext{os.date('\letterpercent d/\letterpercent
> m/\letterpercent Y', os.time()+ 10 * 24 * 3600)}}
>
> \duedate
> \st
if you don’t mind using Lua, here you have it:
\starttext
\def\duedate{\cldcontext{os.date('\letterpercent d/\letterpercent
m/\letterpercent Y', os.time()+ 10 * 24 * 3600)}}
\duedate
\stoptext
Just in case it helps,
Pablo
On 1/14/2018 9:50 PM, Fabrice Couvreur wrote:
Hi Hans,
Your code runs perfectly, thanks. However, if I replace % with
\letterpercent, my code does not run
\ctxlua{print(string.format("\letterpercent g",Binomial(100,60,0.25)))}
because print prints to the console
Thank you
Fab
Hi Hans,
Your code runs perfectly, thanks. However, if I replace % with
\letterpercent, my code does not run
\ctxlua{print(string.format("\letterpercent g",Binomial(100,60,0.25)))}
Thank you
Fabrice
2018-01-14 13:58 GMT+01:00 Hans Hagen <pra...@wxs.nl>:
> On 1/14/2018 1:1
g",Binomial(100,60,0.25)))}
\stoptext
the % should be \letterpercent
btw, use locals for numer and denom
you can also do this:
\startluacode
function document.Binomial(n,k,p)
if k > n then
return nil
end
if k > n/2 then
k = n - k
o you need to escape it:
\xmlsetsetup{#1}{{\letterhash header}}{xml:header:id}
The same is true for % : \letterpercent.
Hans
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061
Are there some other predefined "\letterxxx" commands?
> \letteropenbrace
> \letterclosebrace
> \letterampersand
> \letterless
> \lettermore
> \letterhash
> \letterdoublequote
> \lettersinglequote
> \letterdollar
> \letterpercent
> \letterhat
> \
lequote
\lettersinglequote
\letterdollar
\letterpercent
\letterhat
\letterunderscore
\letterbar
\lettertilde
\letterbackslash
\letterslash
\letterquestionmark
\letterat
\lettercolon
\letterescape
\letterbgroup
\letteregroup
\letterleftbrace
\letterrightbrace
\letterexclamationmark
Is (and how) p
1.
\hyphenatedurl{http://bits.blogs.nytimes.com/2010/03/05/a-former-book-designer-says-good-riddance-to-print/?hpw\%20hpw}
#
# Hi Tomas,
#
# I think \letterpercent is what you need.
#
# Inside a little more complex sample:
#
# \setupinteraction[state=start]
# \unexpanded\def\mypersonalurl#1{%
#
gt; 1.
> \hyphenatedurl{http://bits.blogs.nytimes.com/2010/03/05/a-former-book-designer-says-good-riddance-to-print/?hpw\%20hpw}
Hi Tomas,
I think \letterpercent is what you need.
Inside a little more complex sample:
\setupinteraction[state=start]
\unexpanded\def\mypersonalurl#1{%
}
{pre[contains(@class,'copy\letterpercent-code')]/code}
{xml:copy:code}
\stopxmlsetups
\xmlregistersetup{xml:initialize}
\startxmlsetups xml:doc
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:copy:code
%~ \startcomment[location
Dear list,
I have the following sample:
\startbuffer[demo]
1
2
3
4
5
\stopbuffer
\startxmlsetups xml:initialize
\xmlsetsetup{#1}{doc}{xml:doc}
\xmlsetsetup{\xmldocument}
{pre[contains(@class,'copy\letterpercent-code')]/code
On Mon, 2017-05-08 at 16:27 -0600, Alan Braslau wrote:
> Of course, you have to escape the percent character if you do not
> want
> it to be interpreted as a comment... however, in the example below,
> the
> URL does not get rendered properly, nor does using \letterpercent, so
>
Of course, you have to escape the percent character if you do not want
it to be interpreted as a comment... however, in the example below, the
URL does not get rendered properly, nor does using \letterpercent, so
there is something that we need to fix in our treatment of URLs.
\startbuffer
On Wed, 19 Apr 2017, Procházka Lukáš Ing. wrote:
Hello,
do you mean this? - It shows EXACTLY 3 digits after the decimal point:
\cldcontext{string.format("\letterpercent.3f", 5.8/1.6)}
\cldcontext{string.format(string.char(37) .. ".3f", 5.8/1.6)}
\startluacode
c
Hello,
do you mean this? - It shows EXACTLY 3 digits after the decimal point:
\cldcontext{string.format("\letterpercent.3f", 5.8/1.6)}
\cldcontext{string.format(string.char(37) .. ".3f", 5.8/1.6)}
\startluacode
context(string.format("%.3f", 5.8/1.6))
\
ment again
The error is:
[\directlua]:1: invalid escape sequence near '\%'
1 \starttext
2
3 >> \ctxlua{context(string.format("\%.2f", math.pi))}
4
5 \stoptext
I ended using \letterpercent command but it is not very convenient.
Any help is welc
mat("\%.2f", math.pi))}
> 4
> 5 \stoptext
I ended using \letterpercent command but it is not very convenient.
Any help is welcome,
Antoine C.
Full log:
mtx-context | warning: synctex is enabled
> mtx-context | run 1: luatex
> --fmt=&q
=thirddata.scancsv.ParseCSVLine('#1','n.º');%
local Nlic=(parsedate[2]);%
Nlic=tonumber(string.match(Nlic, '%d+'));%
%d -> \letterpercent d
context(Nlic ~=0 and 1 or 0)}}
\starttext
\licann{"lesson nº456Alterada"}
\stoptext
thanks in advance
\startluacode
On 11/20/2016 8:47 PM, Pablo Rodriguez wrote:
On 11/20/2016 12:13 PM, Hans Hagen wrote:
On 11/18/2016 11:32 PM, Pablo Rodriguez wrote:
[...]
The only way to get the Knuth in the quote is to remove "\letterpercent"
in the lpath.
so why do you use the \letterpercent then
It was
1 - 100 of 185 matches
Mail list logo